package com.rybbaby.tss.platform.sysPreserve.service;

import java.sql.SQLException;
import java.util.List;
import com.rybbaby.tss.core.bean.TableBean;
import com.rybbaby.tss.core.bean.TableColumnBean;
import com.rybbaby.tss.core.web.service.IBaseService;
import com.rybbaby.tss.platform.sysPreserve.pojo.ExecSqlResult;

/**
 * @author 谢进伟
 * @description
 * @createDate 2017/2/28 14:02
 */
public interface IDatabasePreserveService extends IBaseService<Object> {

	/**
	 * 获取当前连接的所有表
	 * @return
	 */
	List<TableBean> getAllTables();

	/**
	 * 获取指定库的指定表的列
	 * @param catalog 方案名称
	 * @param tableName 表名
	 * @return
	 */
	List<TableColumnBean> getTableColumns(String catalog, String tableName)throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException ;

	/**
	 * 执行sql
	 *
	 * @param sqls
	 *            sql语句，多个sql语句用;隔开
	 * @return
	 */
	List<ExecSqlResult> executeSql(String sqls);
}
